package messages;

public class RegistrationMessage extends Message {

	private String username;
	private String password; 
	
	
	public RegistrationMessage(){
		super("Registration");
		this.username = "";
		this.password = "";
	}

	public RegistrationMessage(String type, String username, String password) {
		super("Registration");
		this.username = username;
		this.password = password;
	}

	public String getUsername(){
		return this.username;
	}
	
	public void setUsername(String username){
		this.username = username;
	}
	
	public String getPassword(){
		return this.password;
	}
	
	public void setPassword(String password){
		this.password = password;
	}
	

	// return an XML-formatted version of the message
	public String toXML()
	{
		String message = "<message>";
        message += "<type>Registration</type>";
        message += "<username>" + username + "</username>";
        message += "<password>" + password + "</password>";
        message += "</message>";
        
        return message;
	}
}
